<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/9/25 0025
 * Time: 下午 4:17
 */
namespace app\admin\controller;
use think\console\command\make\Controller;
use think\Db;

class Admin extends Base {
    #管理员主页
    public function index(){
        $version = Db::query('SELECT VERSION() AS ver');
        $config  = [
            'url'             => $_SERVER['HTTP_HOST'],
            'document_root'   => $_SERVER['DOCUMENT_ROOT'],
            'server_os'       => PHP_OS,
            'server_port'     => $_SERVER['SERVER_PORT'],
            'server_ip'       => $_SERVER['SERVER_ADDR'],
            'server_soft'     => $_SERVER['SERVER_SOFTWARE'],
            'php_version'     => PHP_VERSION,
            'mysql_version'   => $version[0]['ver'],
            'max_upload_size' => ini_get('upload_max_filesize'),
            'date'            => date('Y-m-d H:i:s')
        ];

        $this->assign('config', $config);
        $this->assign('name',cookie('name'));
        return $this->fetch('./public/admin/index.html');
    }
    #添加
    public function user_add(){

    }
    #删除
    public function user_update(){

    }
}